<?php
/**
 * 应用详情
 * 
 * @copyright 	Copyright (c) 2011 thinkapk.com All rights reserved.
 * @package 	ThinkAPK_Action
 * @link 		http://www.thinkapk.com/
 * @author 		richie <richbossman@163.com>
 * @version 	$Id: AndroidAction.class.php 7569 2011-06-01 12:49:11Z richie $
 * 
 */
class AndroidAction extends ThinkAPK_Action_Web {
	
	public $Id;
	
	//初始化
	function _initialize(){
		parent::_initialize();
		$this->Id = isset($_REQUEST['id'])?intval($_REQUEST['id']):0;
	}
	
	function _before_index(){
		if(empty($this->Id)) $this->error();
		$appInfo = D('Goods')->find($this->Id);
		if(!$appInfo) $this->error();
		
		$this->assign('appinfo', $appInfo);
		
		//页面属性
		$title = $appInfo['goods_name'];
		if(!empty($appInfo['short_desc'])) $title .= '-'.sub_str($appInfo['short_desc'], 25, false);
		$this->setTitle($title);
		$this->setKeywords($appInfo['keywords']);
		$this->setDescription($appInfo['goods_brief']);
		$this->setPosition($appInfo['cat_id'], $appInfo['goods_name']);
	}
}
?>